<template>
	<component :is="currentLayout"></component>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import Index from './layout/index.vue';
import Layout1 from './layout/Layout1.vue';
import Layout2 from './layout/Layout2.vue';

export default defineComponent({
	name: 'App',
	components: {
		Layout1,
		Layout2,
		Index,
	},
	computed: {
		// 使用何种布局方式
		currentLayout () {
			return this.$route.meta.layout || 'Index';
		}
	}
})
</script>
